package org.example.service.impl;

import org.example.common.entity.Carousel;
import org.example.mapper.CarouselMapper;
import org.example.service.CarouselService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class CarouselServiceImpl implements CarouselService {

    @Autowired
    private CarouselMapper carouselMapper;

    @Override
    public int insert(Carousel carousel) {
        return carouselMapper.insert(carousel);
    }

    @Override
    public int updateById(Carousel carousel) {
        return carouselMapper.updateById(carousel);
    }

    @Override
    public int deleteById(Long id) {
        return carouselMapper.deleteById(id);
    }

    @Override
    public Carousel selectById(Long id) {
        return carouselMapper.selectById(id);
    }

    @Override
    public List<Carousel> selectAll() {
        return carouselMapper.selectAll();
    }

    @Override
    public List<Carousel> selectByPlatformAndStatus(String platform, Integer status) {
        return carouselMapper.selectByPlatformAndStatus(platform, status);
    }
}